<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jstl fn:escapeXml()函数</title>
</head>
<body>
	<div style="margin: auto; width: 90%">
		<h2>fn:escapeXml()函数示例</h2>
		<hr />
		<c:set var="string1" value="This is first String." />
		<c:set var="string2" value="This <abc> is second String <a href=''>link to</a>.</abc>" />

		<b>使用 escapeXml()函数过滤:</b>
		<p>string (1) : ${fn:escapeXml(string1)}</p>
		<p>string (2) : ${fn:escapeXml(string2)}</p>

		<b>未使用 escapeXml()函数过滤:</b>
		<p>string (1) : ${string1}</p>
		<p>string (2) : ${string2}</p>
	</div>
</body>
</html>